home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 July: Mac OS SDK / Dev.CD Jul 96 SDK / Dev.CD Jul 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / ODFDev / ODF / Found / ODUtils / Include / StorUtil.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-04-25  |  2.7 KB  |  111 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        StorUtil.h
  3.  
  4.     Contains:    Utilities for Storage.
  5.  
  6.     Owned by:    Vincent Lo
  7.  
  8.     Copyright:    © 1994 - 1995 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     
  11.     In Progress:
  12.         
  13. */
  14.  
  15.  
  16.  
  17. #ifndef _STORUTIL_
  18. #define _STORUTIL_
  19.  
  20. #ifndef SOM_ODDraft_xh
  21. #include <Draft.xh>
  22. #endif
  23.  
  24. #ifndef _ODTYPES_
  25. #include <ODTypes.h>
  26. #endif
  27.  
  28. #ifndef _ODMEMORY_
  29. #include <ODMemory.h>
  30. #endif
  31.  
  32. #ifndef _PLFMFILE_
  33. #include <PlfmFile.h>
  34. #endif
  35.  
  36. #ifndef SOM_ODPart_xh
  37. #include <Part.xh>
  38. #endif
  39.  
  40. class ODContainer;
  41. class ODSession;
  42. class ODStorageUnitView;
  43. class ODStorageUnit;
  44.  
  45. #ifdef _OD_IMPL_SHARE_UTILS_
  46. #pragma import on
  47. #endif
  48.  
  49.  
  50. extern "C" {
  51.     void        ODSUAddPropValue(Environment* ev,
  52.                                     ODStorageUnit* su,
  53.                                     ODPropertyName prop,
  54.                                     ODValueType val);
  55.     void        ODSUForceFocus(Environment* ev, 
  56.                                 ODStorageUnit* su,
  57.                                 ODPropertyName prop,
  58.                                 ODValueType val);
  59.     ODBoolean    ODSUExistsThenFocus(Environment* ev, 
  60.                                 ODStorageUnit* su,
  61.                                 ODPropertyName prop,
  62.                                 ODValueType val);
  63.     void        ODSURemoveProperty(Environment* ev,
  64.                                 ODStorageUnit* su,
  65.                                 ODPropertyName prop);
  66.     
  67.     PlatformFile*    GetPlatformFileFromContainer(Environment* ev, ODContainer* container);
  68.     ODFileSpec        GetODFileSpecFromContainer(Environment* ev, ODContainer* container);
  69.  
  70.     ODContainer*    CreateFileContainer(Environment* ev, ODSession* session, FSSpec* fsSpec);
  71.     ODContainer*    GetFileContainer(Environment* ev, ODSession* session, FSSpec* fsSpec);
  72.  
  73.     ODContainer*    CreateMemoryContainer(Environment* ev,
  74.                         ODSession* session,
  75.                         ODHandle handle,
  76.                         ODContainerType containerType);
  77.     ODContainer*    GetMemoryContainer(Environment* ev, 
  78.                         ODSession* session,
  79.                         ODHandle handle,
  80.                         ODContainerType containerType);
  81.  
  82.     ODULong            StorageUnitGetValue(ODStorageUnit* su, Environment* ev,
  83.                                         ODULong size, void *buffer);
  84.     ODULong            StorageUnitViewGetValue(ODStorageUnitView* suv, Environment* ev,
  85.                                         ODULong size, void *buffer);
  86.  
  87.     void            StorageUnitSetValue(ODStorageUnit* su, Environment* ev,
  88.                                         ODULong size, const void *buffer);
  89.     void            StorageUnitViewSetValue(ODStorageUnitView* suv, Environment* ev,
  90.                                         ODULong size, const void *buffer);
  91.     void            StorageUnitSetPromiseValue(ODStorageUnit* su, Environment* ev,
  92.                                         ODValueType value, ODULong offset,
  93.                                         ODULong size, const void *buffer, ODPart *sourcePart);
  94.  
  95.     ODBoolean        StorageUnitGetStylFromStyledText(ODStorageUnit* su,
  96.                         Environment* ev,
  97.                         ODULong* size,
  98.                         ODPtr* styl);
  99.                         
  100.     ODCloneKind GetOriginalCloneKind(Environment* ev, ODDraft* draft);
  101.  
  102.     void RemoveDataInterchangeProperties (Environment* ev,
  103.                         ODStorageUnit* su,
  104.                         ODBoolean clonedToFileContainer);
  105. }
  106.  
  107. #ifdef _OD_IMPL_SHARE_UTILS_
  108. #pragma import off
  109. #endif
  110.     
  111. #endif // _STORUTIL_